home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch8w < prev    next >
Encoding:
Internet Message Format  |  1990-06-08  |  59.9 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i041:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8w
  5. Message-ID: <5749@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 18:04:32 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1448
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 41
  13. Archive-name: NetHack3/Patch8w
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 23 (of 24)."
  25. # Contents:  Install.dos Install.vms others/Makefile.os2
  26. #   others/ovlmgr.doc vms/spec_lev.com
  27. # Wrapped by billr@saab on Mon Jun  4 15:40:34 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. echo shar: Extracting \"'Install.dos'\" \(13860 characters\)
  30. sed "s/^X//" >'Install.dos' <<'END_OF_FILE'
  31. X    Instructions for compiling and installing NetHack 3.0
  32. X           on an MS-DOS, TOS, or OS/2 system
  33. X    =====================================================
  34. X        (or, How to make PC, ST, and OS/2 NetHack 3.0)
  35. X              Last revision: 22 May 1990
  36. X
  37. X    Credit for ST and OS/2 NetHack 3.0 goes to Eric Smith and Timo Hakulinen,
  38. X    respectively.  Additional credit should be given to Steve Creps and
  39. X    Mike Threepoint for PC NetHack.
  40. X
  41. X*** Note: if you intend to compile NetHack on an MS-DOS PC using OVERLAY, 
  42. X    please turn to the instructions in Install.ovl.  The overlay version is
  43. X    currently available only for MSC.
  44. X
  45. X1.  Make sure all the NetHack files are in the appropriate directory structure.
  46. X    You should have a main directory with subdirectories src, include, auxil,
  47. X    others, amiga, mac, and vms.  If you do not follow this structure, the
  48. X    Makefile will not function properly.
  49. X
  50. X    All the shared and UNIX-specific .c files and the source Makefile belong
  51. X    in src; all the PC .c files and make files belong in others; all the .h
  52. X    files belong in include; other assorted files belong in auxil.  We will
  53. X    not need any of the files from the amiga, mac, and vms directories.
  54. X
  55. X    If you downloaded or ftp'd the sources from a UNIX system, the lines
  56. X    will probably end in UNIX-style newlines, instead of the carriage
  57. X    return and line feed pairs used by DOS and OS/2.  Turbo C 2.0 in
  58. X    particular dislikes these; you'll have to convert them (with a utility
  59. X    like Rahul Dhesi's "flip").  Also, every file should end with an empty
  60. X    line, because both Microsoft C has a habit of ignoring the last line of
  61. X    each file. (TOS compilers generally don't have either problem).
  62. X
  63. X2.  Copy the .c files from the others directory to your src directory
  64. X    based on the following decisions.  (You will probably want to include
  65. X    all of these files.)
  66. X
  67. X    You will definitely need pc*.c and msdos.c.
  68. X
  69. X    The file termcap.uu is the fixed version of the Fred Fish termcap library.
  70. X    You will need to run a uudecode utility on it to generate the file
  71. X    termcap.arc.  termcap.arc contains several files of termcap routines.
  72. X    Using them with NetHack involves very little knowledge of the UNIX concept
  73. X    of a termcap database; mostly you need to know enough to set a TERM
  74. X    environment variable.  You can unarc termcap.arc here in the others
  75. X    directory, but if you are going to use it, it is probably best to unarc a
  76. X    copy in the src directory.  That way you will not miss copying any
  77. X    files over.  Wherever you unarc it, get rid of the included makefile
  78. X    since a better version has been provided as Makefile.lib.
  79. X
  80. X    random.c is only needed if you want the high-quality random number
  81. X    generation routines.
  82. X
  83. X    trampoli.c and ovlmgr.obj files are needed for the MS-DOS overlays.
  84. X    You may ignore these.
  85. X
  86. X    TOS users should use others/lev_lex.c instead of src/lev_lex.c.
  87. X    MS-DOS users should be able to use either, but the one in src
  88. X    is smaller.  If you have flex or some other lex work-alike, use
  89. X    that to produce lev_lex.c from lev_comp.l.
  90. X
  91. X    Obviously, TOS users don't need the MS-DOS overlay functions.
  92. X    Moreover, the GCC "curses" library has termcap routines built
  93. X    in, so if you have this you don't need termcap.arc.
  94. X
  95. X3.  Now look at Makefile.* in your others directory.  Consult the list below
  96. X    and pick out the makefile most appropriate to your system.  Rename this
  97. X    file to "Makefile" (no extension), and move it into your src directory.
  98. X
  99. X    DOS:
  100. X    Microsoft C 5.0+    Makefile.msc
  101. X    Microsoft C 4.0     Makefile.pc
  102. X    Turbo C 2.0        Makefile.tcc
  103. X    OS/2:
  104. X    Microsoft C 5.1     Makefile.os2
  105. X    TOS:
  106. X    GCC 1.34        Makefile.st
  107. X
  108. X    The PC NetHack makefiles are set up for NDMAKE, a public domain
  109. X    "make" utility.  Both Microsoft's and Borland's "make" leave much to
  110. X    be desired.  It is worth the extra effort to get NDMAKE if you don't
  111. X    already have it.  Among other things, NDMAKE automatically generates
  112. X    link response files when the link command involves so many objects
  113. X    that the command would become longer than DOS can handle.  If you must
  114. X    use Microsoft's or Borland's "make", you'll need to edit the makefile
  115. X    into a form your make can use, and add instructions to generate a link
  116. X    response file.
  117. X
  118. X    Makefile.os2 can also be used with Microsoft NMAKE, which is shipped with
  119. X    new versions of MS languages.  This "make", although slightly incompatible
  120. X    with NDMAKE, is powerful enough to make NetHack.  Since NDMAKE only works
  121. X    in DOS, the only way to compile NetHack in OS/2 currently is to use NMAKE.
  122. X    However, when cross-compiling for OS/2 in DOS, NDMAKE is a better choice
  123. X    because it requires less RAM for itself.  See Makefile.os2 for more
  124. X    information.
  125. X
  126. X    The ST NetHack makefile should work with either the widely available
  127. X    PD make, or (much better) GNU Make.
  128. X
  129. X    If you're using a different compiler, you will have to adapt one of
  130. X    the makefiles to your needs.  In particular, change the CC and CFLAGS
  131. X    macros to your C compiler's file name and the parameters to pass it.
  132. X
  133. X    For DOS users, if you are going to be constructing the Fred Fish termlib
  134. X    you will need the Makefile.lib.  Copy this to your source directory too,
  135. X    and do not change its name.
  136. X
  137. X    Makefile.top in the top directory and Makefile.aux(il) in the
  138. X    auxil directory are for UNIX NetHack.  You may delete them.
  139. X
  140. X4.  Now go to the include subdirectory to edit a couple of the header files
  141. X    there.
  142. X
  143. X    First edit config.h according to the comments to match your system and
  144. X    desired set of features.  Mostly you need to check the WIZARD option,
  145. X    make sure the HACKDIR is set properly, and check TERMLIB and COMPRESS.
  146. X
  147. X    Also edit pcconf.h for PC or OS/2 NetHack, or tosconf.h for ST NetHack.
  148. X    pcconf.h should not need much editing.  If you are not going to include
  149. X    random.c or termcap.uu you will need to comment out RANDOM or TERMLIB
  150. X    respectively.  You will definitely need to comment out OVERLAY.
  151. X
  152. X    Commenting out the #define TERMLIB in pcconf.h/tosconf.h to disable
  153. X    use of termcap routines (relying on the ANSI_DEFAULT feature) will make
  154. X    your job a bit easier.  However, you can compile with both and simply
  155. X    not set your TERM variable if you do not wish to use the termcap file
  156. X    settings.
  157. X
  158. X    ST and OS/2 NetHackers can skip to the next section, since the entire game
  159. X    will fit in less than one megabyte.
  160. X
  161. X PC NetHackers:
  162. X
  163. X    To compile under MS-DOS, you must either produce an overlaid executable or
  164. X    make some very difficult decisions about which features to include.
  165. X
  166. X    The base size of a PC NetHack executable, with no extra features or
  167. X    overlays, will be around 570 (or better) kilobytes.  Anything over 590K
  168. X    is likely not to work.  Here's an incomplete and outdated list of the
  169. X    approximate costs of various additional features in terms of executable
  170. X    size, using Microsoft C:
  171. X
  172. X    WIZARD            3K
  173. X    LOGFILE
  174. X    NEWS
  175. X    COMPRESS        2K
  176. X    ZEROCOMP
  177. X    CHDIR
  178. X
  179. X    POLYSELF       31K
  180. X    THEOLOGY       11K
  181. X    SOUNDS            6K
  182. X    KICK
  183. X
  184. X    THRONES         3K
  185. X    FOUNTAINS        2K
  186. X    SINKS            5K
  187. X    ALTARS            4K
  188. X
  189. X    WALLIFIED_MAZE        1K
  190. X    REINCARNATION        7K
  191. X    STRONGHOLD       13K
  192. X
  193. X    ORACLE
  194. X    MEDUSA
  195. X    KOPS
  196. X    ARMY            1K
  197. X    WORM
  198. X    GOLEMS            2K
  199. X    INFERNO
  200. X    SEDUCE
  201. X    TOLKIEN
  202. X    PROBING         1K
  203. X    WALKIES         4K
  204. X    SHIRT
  205. X    MUSIC            6K
  206. X    TUTTI_FRUTTI
  207. X    SPELLS           10K
  208. X    NAMED_ITEMS
  209. X
  210. X    ELBERETH        3K
  211. X    EXPLORE_MODE        2K
  212. X    HARD
  213. X
  214. X    REDO            1K
  215. X    COM_COMPL        1K
  216. X    CLIPPING
  217. X
  218. X    DGK            7K
  219. X    TERMLIB
  220. X    RANDOM            1K
  221. X    SHELL
  222. X    TEXTCOLOR        1K
  223. X
  224. X    Using Turbo C, we eked by with just WIZARD, ZEROCOMP, BITFIELDS, ELBERETH,
  225. X    HARD, REDO, DGK and TEXTCOLOR.
  226. X
  227. X5.  If you're using a compiler not in the list in step 3, you may want to look
  228. X    through system.h, in the include directory.  This file matches the return
  229. X    and parameter types for system calls and library routines with various
  230. X    flavors of compilers and operating systems.  Leaving this file alone is
  231. X    unlikely to cause problems, but if you get compile errors with any
  232. X    functions in the standard library, it's worth checking the declarations
  233. X    there.
  234. X
  235. X6.  If you want to change the high score list behavior, examine the top of
  236. X    topten.c, in the src directory.  You may want to change the definitions of
  237. X    PERSMAX, POINTSMIN, and ENTRYMAX.  I set POINTSMIN to 51 and ENTRYMAX to
  238. X    50 to keep the size of the score list down.
  239. X
  240. X7.  Go to the src directory and edit the top of your Makefile.  Be sure the
  241. X    directory you want the game installed in actually exists.
  242. X
  243. X    If you elected not to use the high-quality BSD random number routines by
  244. X    commenting out RANDOM in pcconf.h or tosconf.h, comment out (or set equal
  245. X    to nothing) the RANDOM macro in your Makefile.
  246. X
  247. X    If you elected to use Fred Fish's termcap library (bundled in as
  248. X    termcap.arc), you will have to generate termcap.lib from those sources
  249. X    by typing make -f makefile.lib termlib.lib.  DOS / OS/2 users must set the
  250. X    TERMLIB option in Makefile.msc / Makefile.os2 to link in the resulting
  251. X    termlib.lib.
  252. X
  253. X    If you are recompiling after patching your sources, or if you got your
  254. X    files from somewhere other than the official distribution, "touch
  255. X    makedefs.c" to ensure that certain files (onames.h and pm.h) are remade,
  256. X    lest potentially troublesome timestamps fool "make".
  257. X
  258. X8.  Now, enter "make all", and take a long siesta; your computer will be
  259. X    occupied for a long time.  If all goes well, you will get an executable.
  260. X    If you tried to compile in too many features, you will probably get a
  261. X    dysfunctional executable, and will have to start over.
  262. X
  263. X    Hint:  If you're short on memory, you might enter "make -n all
  264. X    >script.bat", and then in DOS enter "script", or in TOS use the Gulam
  265. X    command "source script.bat".  GCC users will be short on memory if
  266. X    they only have 2 megabytes. Indeed, some files will not compile in
  267. X    2 megabytes with the GCC 1.36; for these you'll either have to turn
  268. X    off the -O option or use an earlier version of the GCC.
  269. X
  270. X9.  Make sure the support files-- data, rumors, cmdhelp, opthelp, help, hh,
  271. X    history, license, and oracles (if ORACLES was #define'd)-- were copied
  272. X    to the game directory.  If not, move them there from the auxil directory
  273. X    yourself.  rumors can be created manually by entering "makedefs -r";
  274. X    data by entering "makedefs -d".
  275. X
  276. X    If you compiled in the compiled levels (if STRONGHOLD was #define'd), make
  277. X    sure castle, tower?, and possibly endgame are there, too.  They can be
  278. X    created manually by entering "lev_comp filename.des", where filename.des
  279. X    is the appropriate description file (found in the auxil directory).
  280. X
  281. X10. Go to the others directory.  Copy NetHack.cnf, or Atari.cnf for TOS, to
  282. X    your game directory as "NetHack.cnf".  Edit it to reflect your particular
  283. X    setup and personal preferences, following the comments.
  284. X
  285. X    If you compiled in the TERMLIB feature, also move the "termcap" file to
  286. X    your game directory.  (Note:  GCC's termcap routines have built-in
  287. X    defaults, so the termcap file is not necessary with that compiler.)
  288. X
  289. X    To use funky graphics charaters in TOS, uudecode "atarifnt.uue" and unarc
  290. X    the resulting "atarifnt.arc".  This contains a program to run that makes
  291. X    some line graphics characters available to NetHack.  To use them, uncomment
  292. X    the appropriate line in your NetHack.cnf file, and run the program before
  293. X    running NetHack (you can put the program in an AUTO folder if you want).
  294. X
  295. X    If you'll be running NetHack from a different subdirectory, you will
  296. X    want to "set HACKDIR=\games\nethack" (or whatever directory you want to
  297. X    use) now.  Add it to your autoexec.bat (in DOS), if you'll be playing
  298. X    often.
  299. X
  300. X11. Play NetHack.  If it works, you're done!
  301. X
  302. X
  303. XNotes
  304. X-----
  305. X
  306. X1)  Save files and bones files from previous versions will not work with
  307. X    NetHack 3.0.  Don't bother trying to keep them.  Record (score) files
  308. X    from before 3.0 patchlevel 7 will almost work, but you need to make one
  309. X    change manually to them:  At the end of each line is a word or phrase
  310. X    specifying what killed the player.  Change the string to start with the
  311. X    words "killed by", "killed by a", or "killed by an" (whichever is
  312. X    appropriate).  If the death was petrification, it should read "petrified
  313. X    by" instead of "killed by".  Don't change "starvation", "quit", "escaped",
  314. X    or "ascended".
  315. X
  316. X2)  To install an update of NetHack after changing something, enter "make"
  317. X    from the src directory.  If you add, delete, or reorder monsters or
  318. X    objects, or you change the format of saved level files, delete any save
  319. X    and bones files.  (Trying to use such files sometimes produces amusing
  320. X    confusions on the game's part, but usually crashes.)
  321. X
  322. X3)  During linking, the Microsoft Overlay Linker will need temporary storage
  323. X    space to make the PC and OS/2 versions.  Make sure you have
  324. X    about a meg of free disk where ever you have defined your temporary
  325. X    storage.  It is also a good idea to compile with as much free RAM as
  326. X    possible.  It may otherwise get crowded with the bigger, more complex
  327. X    source files.  (Compiler bombs with "out of heap space" or similar.)
  328. X    If this happens, strip your configuration, zap TSR's etc.
  329. X
  330. X4)  On a 286 10MHz PC you will have NetHack in about 2 - 2.5 hours.
  331. X
  332. X5)  Both OS/2 NetHack and the overlaid PC NetHack have been developed using
  333. X    MSC 5.1.  MSC 6.0 is on the market, but since there hasn't been enough
  334. X    time to fully test the game compiled with MSC 6.0, the distribution version
  335. X    supports officially only MSC 5.1.  To compile NetHack with MSC 6.0, it may
  336. X    be necessary to make some slight modifications to respective makefiles
  337. X    as well as some source files.  Also, when compiling OS/2 version with MSC
  338. X    6.0, change library "doscalls" to "os2" in Makefile.os2.
  339. END_OF_FILE
  340. if test 13860 -ne `wc -c <'Install.dos'`; then
  341.     echo shar: \"'Install.dos'\" unpacked with wrong size!
  342. fi
  343. # end of 'Install.dos'
  344. echo shar: Extracting \"'Install.vms'\" \(10809 characters\)
  345. sed "s/^X//" >'Install.vms' <<'END_OF_FILE'
  346. X
  347. X               Instructions for Installing NetHack 3.0 
  348. X                          on a VMS system
  349. X               =======================================
  350. X
  351. X    (Credit for an enhanced VMS NetHack 3.0 goes to the VMS team of
  352. X    Joshua Delahunty and Pat Rankin who built on the work of David
  353. X    Gentzel.)
  354. X
  355. X1.  Building NetHack requires a C compiler (either VAX C or GNU C) and
  356. X    VMS version 4.6 or later (but see note #9).  It has been tested on 5.3;
  357. X    as of this writing, 5.4 has not yet been released.  For MicroVMS 4.6
  358. X    or 4.7, an extra edit is required in file vmsconf.h (see step #3).
  359. X    The new build procedure (vmsbuild.com) should not need to be
  360. X    modified; it now accepts an option for selecting VAXC vs GNUC, and it
  361. X    can detect different versions of VAXC to use appropriate CC command
  362. X    qualifiers.  Versions of VAXC earlier than v2.3 will produce many
  363. X    warning messages (over 100 per source file; close to 10,000 total!),
  364. X    but NetHack has been verified to compile, link, and execute correctly
  365. X    when built with VAXC v2.2 using vmsbuild.com.
  366. X
  367. X2.  Make sure all the NetHack files are in the appropriate directory
  368. X    structure.  You should have a main directory with subdirectories
  369. X    [.vms], [.src], [.include], [.auxil], and [.others]; you may also
  370. X    have [.amiga] and [.mac], but they are not needed to build NetHack
  371. X    on VMS.  If you do not follow this structure, the supplied procedures
  372. X    and instructions in this file will not function properly.  The .c
  373. X    files in [.src] are files which are used by all versions of NetHack,
  374. X    regardless of machine (there are a few UNIX-specific files, but we can
  375. X    ignore them).  The build & install command procedures (.com), the
  376. X    VMS-specific .c files, and one VMS-specific .h file belong in [.vms].
  377. X    All the .h files (except lev_lex.h) belong in [.include].  Other
  378. X    assorted files belong in [.auxil].  The only files in [.others] used
  379. X    by the VMS version of NetHack are random.c and possibly termcap.
  380. X    (The directory structure is also described in the file called Files.)
  381. X
  382. X3.  Go to the [.include] subdirectory and edit vmsconf.h according to
  383. X    the comments.  You may also want to edit config.h, but that's only
  384. X    necessary if you want or need to disable some of the game options.
  385. X    The distributed copy of config.h will work successfully on VMS;
  386. X    vmsconf.h has conditional code to deal with the UNIX-specific items.
  387. X
  388. X4.  Go to the [.src] directory and look at the top of topten.c.  You may
  389. X    want to change the definitions of PERSMAX and PERS_IS_UID here to get
  390. X    different behavior from the high score list.
  391. X
  392. X5.  If you have lex or flex and yacc or bison, you may edit the procedure
  393. X    [.vms]spec_lev.com and execute it to process a couple of source files
  394. X    for NetHack's special level compiler.  This step is optional; the
  395. X    distribution contains pre-processed versions of these files that can
  396. X    be used as is.
  397. X       $ @[.VMS]SPEC_LEV        !{OPTIONAL}
  398. X    If you perform this step, do so prior to executing vmsbuild.com.
  399. X
  400. X6.  To build NETHACK.EXE and a couple of its auxiliary programs, execute
  401. X    the following two DCL commands:
  402. X       $ SET DEFAULT [.SRC]     !assuming you're currently in 'main'
  403. X       $ @[-.VMS]VMSBUILD       !defaults to VAXC unless symbol 'CC' exists
  404. X    or $ @[-.VMS]VMSBUILD "GNUC"
  405. X    then go get a cup of coffee or take a nap.  Using VAXC v3.1, the
  406. X    build procedure takes about 45-60 minutes on an unloaded VAXstation
  407. X    3100-38 with local disk; it will take *much* longer on slower systems
  408. X    such as uVAX-II and 11/7xx.  After completion, you should now have
  409. X    created the game executable, NETHACK.EXE, with a size of roughly 1300
  410. X    blocks (larger if the VAXCRTL object-library option of vmsbuild is used).
  411. X
  412. X7.  Go back to the main directory.  Edit [.vms]install.com to indicate
  413. X    where you want everything to be installed.  Use the command
  414. X       $ @[.VMS]INSTALL
  415. X    to build some data files using the two auxiliary programs, and to
  416. X    create the target directory and copy all necessary files there.
  417. X    After it completes, the files [.src]*.obj, [.src]nethack.olb and
  418. X    [.src]*.exe can be deleted if you wish to recover their disk space.
  419. X
  420. XNotes:
  421. X
  422. X1.  VMS NetHack uses the termcap routines borrowed from GNU Emacs.  These
  423. X    have been supplied for those who do not already have GNU Emacs, but
  424. X    they are not properly a part of the NetHack distribution.  Since
  425. X    these files (vmstermcap.c and vmstparam.c) bear the usual GNU license,
  426. X    any executable made with these files is also under the GNU license,
  427. X    which among other things means you must be prepared to distribute all
  428. X    the source that went into the executable if you distribute the
  429. X    executable.  See the GNU license in the files for further details.
  430. X
  431. X2.  termcap is a text file containing descriptions of terminal capabilities
  432. X    and the escape sequences that software must use to take advantage of
  433. X    them.  If you do not already have a termcap file in use on your
  434. X    system there is a small one in file [.OTHERS]TERMCAP.  It contains
  435. X    definitions for common Digital terminals, also suitable for most
  436. X    clones and emulators.  NetHack uses the translation of the logical
  437. X    name TERMCAP to find the termcap file, so you need to use the DCL
  438. X    command DEFINE or ASSIGN to set it up.  It uses the logical name
  439. X    NETHACK_TERM to get the name of the terminal (such as "vt100").  If
  440. X    that logical name is not defined, it tries EMACS_TERM.  If that also
  441. X    is not defined, it uses the value generated by the C Run-Time library,
  442. X    which is normally of the form "vt100-80" or "vt200-132".
  443. X
  444. X3.  There is code which attempts to make NetHack secure in case it is
  445. X    installed with privileges (to allow the playground to be protected against
  446. X    world write).  THIS HAS NOT BEEN TESTED.  Install NetHack with privileges
  447. X    at your own risk.  If you do so, however, we would love to hear of your
  448. X    experiences, good or bad.  The default setup uses world-writeable files,
  449. X    which is NOT secure and not advisable in any environment where there
  450. X    are untrustworthy users.  If you allow users to run NetHack from
  451. X    captive accounts (VMS 5.1 or earlier) or from restricted accounts
  452. X    (5.2 and later), you must either make sure that they do not have TMPMBX
  453. X    privilege or else disable NetHack's ability to spawn an interactive
  454. X    subprocess.  To disable subprocesses, disable the "!" (shell) command
  455. X    by commenting out the definition of SHELL in vmsconf.h prior to
  456. X    building the program.  This necessity will be removed in a future
  457. X    release, where NetHack will check for captive accounts correctly.
  458. X
  459. X4.  VMS NetHack uses SMG$READ_KEYSTROKE to read characters from the
  460. X    keyboard.  This means that arrow keys work, but also means that using
  461. X    escape to abort commands doesn't.  If you want to abort a command use
  462. X    two escapes or ^Z.  Just about any non-arrow function key should also
  463. X    work as an abort.  Note that under UNIX ^Z is the suspend command; a
  464. X    future release may re-utilize ^Z in some similar capacity on VMS.
  465. X
  466. X5.  NetHack does not run in PASTHRU or PASSALL mode.  This is to allow ^C
  467. X    interrupts.  An unpleasant (albeit minor) side-effect of this is that
  468. X    some wizard commands don't work (^G, ^O, ^X).  Another side-effect is
  469. X    that ^Y and ^C echo "<interrupt>" and "<cancel>" respectively.  This
  470. X    will be fixed in a future release.
  471. X
  472. X6.  To install an update of this version of NetHack after changing something
  473. X    you will have to go through almost the entire build process (unless you
  474. X    know for certain exactly what needs to be rebuilt).  If you added,
  475. X    deleted, or reordered monsters or objects or changed the format of saved
  476. X    level files, you should also remove any saved games and bones levels.
  477. X    (Trying to use such files often produces amusing but useless confusions
  478. X    on the game's part.)  If you just want to re-link the program, you
  479. X    can invoke vmsbuild.com with a parameter value of "LINK", as in
  480. X       $ @[-.vms]vmsbuild "LINK"
  481. X    If you need to link with the GNUC library, then you must have a DCL
  482. X    symbol 'CC' whose value begins with "G" (or "g").  This is necessary
  483. X    because the mechanism for specifying GNUC vs VAXC is not accessible
  484. X    when you specify "LINK" as the procedure parameter.
  485. X
  486. X7.  In version 3.0 patchlevel 7, the format of the record (score) file
  487. X    was changed.  If you want to use an old record file from an earlier
  488. X    version, manually edit it so that the killer (last item on each line)
  489. X    is preceded by "killed by", "killed by a", or "killed by an".  If the
  490. X    death was by petrification, use "petrified by" instead.  Do not
  491. X    change "starvation", "quit", "escaped", or "ascended".  Record files
  492. X    retained from patchlevel 7 to patchlevel 8 do not need any fixups.
  493. X
  494. X8.  NetHack optionally maintains a logfile which receives one line appended
  495. X    to it whenever a game ends.  This can be disabled entirely by adding
  496. X    an "#undef LOGFILE" directive to vmsconf.h prior to building the
  497. X    program, or it can be disabled later by removing the file "LOGFILE."
  498. X    from the playground directory.  If not disabled prior to compilation,
  499. X    the logfile can be reinitialized by simply creating an empty LOGFILE
  500. X    in the playground, but make sure that it's protected properly or new
  501. X    entries will not be appended.
  502. X
  503. X9.  Support for VMS versions earlier than V4.6 is now included.  The need
  504. X    for this support is detected automatically by vmsbuild.com, and also
  505. X    automatically used when needed, but it has not received as thorough a
  506. X    testing as the rest of NetHack.  The reason that special support is
  507. X    needed is that the C Run-Time Library (VAXCRTL) underwent a major
  508. X    revision for VMS V4.6.  Several routines which NetHack utilizes were
  509. X    not available prior to that upgrade.
  510. X
  511. X10. The new release of vmsbuild.com collects most of the object files
  512. X    (xxx.OBJ) into an object library (NETHACK.OLB) as it compiles the
  513. X    source files.  This should prevent the EXQUOTA problem that some
  514. X    sites have reported when linking nethack.exe, by limiting the number
  515. X    of files which the linker accesses at one time.  Note that if you
  516. X    compile any source files manually, you'll need to replace those
  517. X    modules in the object library prior to linking the program:
  518. X       $ cc/include=[-.include] [-.vms]vmstty   !for example
  519. X       $ libr/obj nethack vmstty                !replace VMSTTY
  520. X       $ @[-.vms]vmsbuild LINK                  !re-link NETHACK.EXE
  521. X    If you forget to replace the library entry, your newly compiled code
  522. X    will not be included in the new executable image.
  523. X
  524. X11. If necessary, send problem reports via email to
  525. X       "nethack-bugs@linc.cis.upenn.edu"  (Internet address 130.91.6.8).
  526. X
  527. X27-MAY-1990
  528. END_OF_FILE
  529. if test 10809 -ne `wc -c <'Install.vms'`; then
  530.     echo shar: \"'Install.vms'\" unpacked with wrong size!
  531. fi
  532. # end of 'Install.vms'
  533. echo shar: Extracting \"'others/Makefile.os2'\" \(17844 characters\)
  534. sed "s/^X//" >'others/Makefile.os2' <<'END_OF_FILE'
  535. X#    SCCS Id: @(#)Makefile.os2    3.0    90/02/22
  536. X#    OS/2 NetHack 3.0 Makefile for Microsoft(tm) C 5.1 -- Timo Hakulinen
  537. X#
  538. X#    NDMAKE ver 4.5 or MS-NMAKE is required, MS-MAKE will not work.
  539. X#    To enable either make utility, uncomment the respective
  540. X#    make-specific macros. If you plan to cross-compile in DOS, your
  541. X#    best bet is NDMAKE, since it requires less memory than NMAKE.
  542. X#    To compile in OS/2 use NMAKE or compatible.  Remember to set
  543. X#    $(RLIBS) to real mode libraries if compiling in DOS, and to
  544. X#    protected mode libraries for compilation in OS/2.
  545. X#
  546. X#    Copy pctty.c, pcunix.c, pcmain.c, msdos.c and this file
  547. X#    (+ termcap library if used) into $(SRC) directory, rename
  548. X#    this file to "makefile" (important, some targets rely on it),
  549. X#    compile and link inside $(SRC).  Termcap library can be built
  550. X#    from termcap sources using makefile.lib in "others" directory.
  551. X#
  552. X#    When using CodeView versions earlier than ver. 2.3, define
  553. X#    OS2_CODEVIEW in pcconf.h and set HACKDIR (+ TERM and TERMCAP
  554. X#    if used) in OS/2 config.sys. Otherwise path searches may fail.
  555. X#
  556. X#    Note that $(GAMEDIR) must exist prior to compilation.
  557. X#
  558. XCC    = cl
  559. XLINK    = link
  560. XLIB    = lib
  561. X
  562. X# Enable the upper three lines for NDMAKE and lower three for MS-NMAKE.
  563. X# ($(MAKE) macro is often predefined, so we use $(MAKEBIN) instead).
  564. XMAKEBIN = make
  565. XAB    = $*.c
  566. XCB    = $*.c
  567. X#MAKEBIN = nmake
  568. X#AB    = $(@B).c
  569. X#CB    = $$(@B).c
  570. X
  571. X# For those of us who have these on PC.
  572. X#YACC    = yacc
  573. X#LEX    = lex
  574. XYACC    = bison -y
  575. XLEX    = flex
  576. X# Standard file names may vary in PC installations.
  577. XYTABC    = y_tab.c
  578. XYTABH    = y_tab.h
  579. XLEXYYC    = lexyy.c
  580. X
  581. X# Directories (makedefs hardcodes these, don't change them).
  582. XINCL    = ..\include
  583. XAUX    = ..\auxil
  584. XSRC    = ..\src
  585. XOBJ    = $(SRC)\o2
  586. X
  587. X# The game name and description.
  588. XGAME    = nethack
  589. XGAMEDES = NetHack 3.0
  590. X
  591. X# The game directory.
  592. XGAMEDIR = \games\$(GAME)
  593. X
  594. X# Memory model, compile only, disable optimization, remove stack probes,
  595. X# 80286 instruction set, dedicated datasegment for items >= 5 bytes,
  596. X# pack structures on 1 byte boundaries, generate code for 8087
  597. X# coprocessor, compiler warning level, include file path.
  598. XCFLAGS    = /AL /c /Od /Gs /G2 /Gt5 /Zp1 /FPi87 /W1 /I$(INCL) $(CDFLAGS)
  599. X
  600. X# + prepare for CodeView symbolic debugger.
  601. XCDFLAGS =
  602. X#CDFLAGS = /Zi
  603. X
  604. X# Don't ignore case in symbols, no default lib search, stack 4096 bytes.
  605. X# (actually a bit of overkill), allow max 1024 segments in program.
  606. XLFLAGS    = /noig /nod /stack:4096 /seg:1024 $(LDFLAGS)
  607. X
  608. X# + prepare for CodeView symbolic debugger.
  609. XLDFLAGS =
  610. X#LDFLAGS = /CO
  611. X
  612. X# Protected mode C libraries for 8087 (change if necessary),
  613. X# OS/2 API entry points.
  614. XPLIBS    = llibc7p doscalls
  615. X
  616. X# C libraries used by makedefs and lev_comp (change if necessary).
  617. X# If compilation is done in DOS, enable the upper line, if in OS/2,
  618. X# the lower (protected mode libraries).
  619. XRLIBS    = llibc7r
  620. X#RLIBS    = $(PLIBS)
  621. X
  622. X# Module definition file for OS/2.
  623. XOS2DEFS    = $(GAME).def
  624. X
  625. X# The default make target (so just typing 'make' is useful).
  626. Xdefault: $(GAME)
  627. X
  628. X# If you have yacc and lex programs and make any changes, comment out the
  629. X# upper two lines and uncomment the lower two.
  630. Xdo_yacc: yacc_msg
  631. Xdo_lex:  lex_msg
  632. X#do_yacc: yacc_act
  633. X#do_lex:  lex_act
  634. X
  635. X# Optional high-quality BSD random number generation routines (see pcconf.h).
  636. X# Set to nothing if not used.
  637. XRANDOM    = $(OBJ)\random.o
  638. X#RANDOM    =
  639. X
  640. X# If TERMLIB defined in pcconf.h, comment out the upper line and
  641. X# uncomment the lower.  If the termcap-library doesn't exist, use
  642. X# others\makefile.lib to build it.
  643. XTERMLIB =
  644. X#TERMLIB = termlib.lib
  645. X
  646. X######################################################################
  647. X#
  648. X# Nothing below this line should have to be changed.
  649. X#
  650. X# Other things that have to be reconfigured are in
  651. X# config.h, pcconf.h and possibly system.h.
  652. X#
  653. X
  654. X# The game filename.
  655. XGAMEFILE = $(GAMEDIR)\$(GAME).exe
  656. X
  657. X# Object files for makedefs.
  658. XMAKEOBJS = $(OBJ)\makedefs.o $(OBJ)\monst.o $(OBJ)\objects.o
  659. X
  660. X# Object files for special levels compiler.
  661. XSOBJ01 = $(OBJ)\lev_comp.o $(OBJ)\lev_lex.o $(OBJ)\lev_main.o $(OBJ)\alloc.o
  662. XSOBJ02 = $(OBJ)\monst.o $(OBJ)\objects.o $(OBJ)\panic.o
  663. X
  664. XSPLEVOBJS = $(SOBJ01) $(SOBJ02)
  665. X
  666. XVOBJ01 = $(OBJ)\allmain.o  $(OBJ)\alloc.o    $(OBJ)\apply.o    $(OBJ)\artifact.o
  667. XVOBJ02 = $(OBJ)\attrib.o   $(OBJ)\bones.o    $(OBJ)\cmd.o      $(OBJ)\dbridge.o
  668. XVOBJ03 = $(OBJ)\decl.o     $(OBJ)\demon.o    $(OBJ)\do.o       $(OBJ)\do_name.o
  669. XVOBJ04 = $(OBJ)\do_wear.o  $(OBJ)\dog.o      $(OBJ)\dogmove.o  $(OBJ)\dokick.o
  670. XVOBJ05 = $(OBJ)\dothrow.o  $(OBJ)\eat.o      $(OBJ)\end.o
  671. XVOBJ06 = $(OBJ)\engrave.o  $(OBJ)\exper.o    $(OBJ)\extralev.o $(OBJ)\fountain.o
  672. XVOBJ07 = $(OBJ)\getline.o  $(OBJ)\hack.o     $(OBJ)\invent.o   $(OBJ)\lock.o
  673. XVOBJ08 = $(OBJ)\mail.o     $(OBJ)\main.o     $(OBJ)\makemon.o  $(OBJ)\mcastu.o
  674. XVOBJ09 = $(OBJ)\mhitm.o    $(OBJ)\mhitu.o    $(OBJ)\mklev.o    $(OBJ)\mkmaze.o
  675. XVOBJ10 = $(OBJ)\mkobj.o    $(OBJ)\mkroom.o   $(OBJ)\mon.o      $(OBJ)\mondata.o
  676. XVOBJ11 = $(OBJ)\msdos.o    $(OBJ)\monmove.o  $(OBJ)\monst.o    $(OBJ)\mthrowu.o
  677. XVOBJ12 = $(OBJ)\music.o    $(OBJ)\o_init.o   $(OBJ)\objects.o
  678. XVOBJ13 = $(OBJ)\objnam.o   $(OBJ)\options.o  $(OBJ)\pager.o    $(OBJ)\pickup.o
  679. XVOBJ14 = $(OBJ)\polyself.o $(OBJ)\potion.o   $(OBJ)\pray.o     $(OBJ)\pri.o
  680. XVOBJ15 = $(OBJ)\priest.o   $(OBJ)\prisym.o   $(RANDOM)         $(OBJ)\read.o
  681. XVOBJ16 = $(OBJ)\restore.o  $(OBJ)\rip.o      $(OBJ)\rnd.o      $(OBJ)\rumors.o
  682. XVOBJ17 = $(OBJ)\save.o     $(OBJ)\search.o   $(OBJ)\shk.o      $(OBJ)\shknam.o
  683. XVOBJ18 = $(OBJ)\sit.o      $(OBJ)\sounds.o   $(OBJ)\sp_lev.o   $(OBJ)\spell.o
  684. XVOBJ20 = $(OBJ)\steal.o    $(OBJ)\termcap.o  $(OBJ)\timeout.o  $(OBJ)\topl.o
  685. XVOBJ21 = $(OBJ)\topten.o   $(OBJ)\track.o    $(OBJ)\trap.o     $(OBJ)\tty.o
  686. XVOBJ22 = $(OBJ)\u_init.o   $(OBJ)\uhitm.o    $(OBJ)\unix.o     $(OBJ)\vault.o
  687. XVOBJ23 = $(OBJ)\weapon.o   $(OBJ)\were.o     $(OBJ)\wield.o
  688. XVOBJ24 = $(OBJ)\wizard.o   $(OBJ)\worm.o     $(OBJ)\worn.o     $(OBJ)\write.o
  689. XVOBJ25 = $(OBJ)\zap.o
  690. XHHOBJ  = $(OBJ)\version.o
  691. X
  692. XVOBJ =    $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) $(VOBJ06) $(VOBJ07) \
  693. X    $(VOBJ08) $(VOBJ09) $(VOBJ10) $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) \
  694. X    $(VOBJ15) $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ20) $(VOBJ21) $(VOBJ22) \
  695. X    $(VOBJ23) $(VOBJ24) $(VOBJ25)
  696. XHOBJ =    $(VOBJ) $(HHOBJ)
  697. X
  698. XPCCONF_H   = $(INCL)\pcconf.h $(INCL)\msdos.h $(INCL)\system.h \
  699. X         $(INCL)\extern.h $(INCL)\def_os2.h
  700. XGLOBAL_H   = $(INCL)\global.h $(INCL)\coord.h $(PCCONF_H)
  701. XCONFIG_H   = $(INCL)\config.h $(INCL)\tradstdc.h $(GLOBAL_H)
  702. XTRAP_H       = $(INCL)\trap.h
  703. XPERMONST_H = $(INCL)\permonst.h $(INCL)\monattk.h $(INCL)\monflag.h
  704. XYOU_H       = $(INCL)\you.h $(INCL)\attrib.h $(PERMONST_H) $(INCL)\mondata.h \
  705. X         $(INCL)\monst.h $(INCL)\youprop.h $(INCL)\prop.h $(INCL)\pm.h
  706. XDECL_H       = $(INCL)\decl.h $(INCL)\spell.h $(INCL)\obj.h $(YOU_H) \
  707. X         $(INCL)\onames.h $(INCL)\color.h
  708. XHACK_H       = $(CONFIG_H) $(DECL_H) $(INCL)\monsym.h $(INCL)\mkroom.h \
  709. X         $(INCL)\objclass.h $(INCL)\gold.h $(TRAP_H) $(INCL)\flag.h \
  710. X         $(INCL)\rm.h $(INCL)\hack.h
  711. X
  712. X# The default target
  713. X
  714. Xall:    makedefs lev_comp $(GAME) auxil
  715. X    @echo Done.
  716. X
  717. X# The main target
  718. X
  719. X$(GAME): $(OBJ) $(GAMEDIR)\$(GAME).exe
  720. X$(GAME).exe: $(GAMEDIR)\$(GAME).exe
  721. X$(GAMEDIR)\$(GAME).exe: $(GAME).res
  722. X    $(LINK) @$(GAME).res
  723. X
  724. X$(GAME).res: $(HOBJ) $(OS2DEFS)
  725. X    @echo $(VOBJ01) +> $@
  726. X    @echo $(VOBJ02) +>> $@
  727. X    @echo $(VOBJ03) +>> $@
  728. X    @echo $(VOBJ04) +>> $@
  729. X    @echo $(VOBJ05) +>> $@
  730. X    @echo $(VOBJ06) +>> $@
  731. X    @echo $(VOBJ07) +>> $@
  732. X    @echo $(VOBJ08) +>> $@
  733. X    @echo $(VOBJ09) +>> $@
  734. X    @echo $(VOBJ10) +>> $@
  735. X    @echo $(VOBJ11) +>> $@
  736. X    @echo $(VOBJ12) +>> $@
  737. X    @echo $(VOBJ13) +>> $@
  738. X    @echo $(VOBJ14) +>> $@
  739. X    @echo $(VOBJ15) +>> $@
  740. X    @echo $(VOBJ16) +>> $@
  741. X    @echo $(VOBJ17) +>> $@
  742. X    @echo $(VOBJ18) +>> $@
  743. X    @echo $(VOBJ20) +>> $@
  744. X    @echo $(VOBJ21) +>> $@
  745. X    @echo $(VOBJ22) +>> $@
  746. X    @echo $(VOBJ23) +>> $@
  747. X    @echo $(VOBJ24) +>> $@
  748. X    @echo $(VOBJ25) +>> $@
  749. X    @echo $(HHOBJ)>> $@
  750. X    @echo $(GAMEDIR)\$(GAME)>> $@
  751. X    @echo $(GAME)>> $@
  752. X    @echo $(PLIBS) $(TERMLIB)>> $@
  753. X    @echo $(OS2DEFS) $(LFLAGS);>> $@
  754. X
  755. X$(OBJ):
  756. X    -mkdir $(OBJ)
  757. X
  758. X# Targets for makedefs.
  759. X
  760. Xmakedefs: $(OBJ) makedefs.exe
  761. Xmakedefs.exe: makedefs.res
  762. X    $(LINK) @makedefs.res
  763. X
  764. Xmakedefs.res: $(MAKEOBJS)
  765. X    @echo $(MAKEOBJS)> $@
  766. X    @echo makedefs>> $@
  767. X    @echo nul>> $@
  768. X    @echo $(RLIBS)>> $@
  769. X    @echo $(LFLAGS);>> $@
  770. X
  771. X$(OBJ)\makedefs.o : $(CB) $(INCL)\config.h $(INCL)\permonst.h $(INCL)\objclass.h
  772. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  773. X
  774. X# Targets for the special levels compiler.
  775. X
  776. Xlev_comp: $(OBJ) lev_comp.exe
  777. Xlev_comp.exe: lev_comp.res
  778. X    $(LINK) @lev_comp.res
  779. X
  780. Xlev_comp.res: $(SPLEVOBJS)
  781. X    @echo $(SOBJ01) +> $@
  782. X    @echo $(SOBJ02)>> $@
  783. X    @echo lev_comp>> $@
  784. X    @echo nul>> $@
  785. X    @echo $(RLIBS)>> $@
  786. X    @echo $(LFLAGS);>> $@
  787. X
  788. X$(OBJ)\lev_comp.o : $(CB) $(HACK_H) $(INCL)\sp_lev.h
  789. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  790. X$(OBJ)\lev_lex.o  : $(CB) $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev_comp.h
  791. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  792. X$(OBJ)\lev_main.o : $(CB) $(HACK_H)
  793. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  794. X
  795. Xlev_comp.c : lev_comp.y
  796. X    $(MAKEBIN) do_yacc
  797. X
  798. Xlev_lex.c  : lev_comp.l
  799. X    $(MAKEBIN) do_lex
  800. X
  801. Xyacc_msg:
  802. X    @echo lev_comp.y has changed. To update lev_comp.c and lev_comp.h run YACC.
  803. X
  804. Xyacc_act:
  805. X    $(YACC) -d lev_comp.y
  806. X    copy $(YTABC) lev_comp.c
  807. X    copy $(YTABH) $(INCL)\lev_comp.h
  808. X    del $(YTABC)
  809. X    del $(YTABH)
  810. X
  811. Xlex_msg:
  812. X    @echo lev_comp.l has changed. To update lev_lex.c run LEX.
  813. X
  814. Xlex_act:
  815. X    $(LEX) lev_comp.l
  816. X    copy $(LEXYYC) lev_lex.c
  817. X    del $(LEXYYC)
  818. X
  819. X#
  820. X#    The following include files depend on makedefs to be created.
  821. X#
  822. X#    date.h should be remade any time any of the source or include code
  823. X#    is modified.
  824. X#
  825. X$(INCL)\date.h: $(VOBJ) makedefs.exe
  826. X    makedefs -v
  827. X
  828. X$(INCL)\trap.h:    makedefs.exe
  829. X    makedefs -t
  830. X
  831. X$(INCL)\onames.h: makedefs.exe
  832. X    makedefs -o
  833. X
  834. X$(INCL)\pm.h: makedefs.exe
  835. X    makedefs -p
  836. X
  837. Xdata:    $(AUX)\data.bas makedefs.exe
  838. X    makedefs -d
  839. X
  840. Xrumors: $(AUX)\rumors.tru $(AUX)\rumors.fal makedefs.exe
  841. X    makedefs -r
  842. X
  843. X#
  844. X#    The following programs vary depending on what OS you are using.
  845. X#
  846. X$(OBJ)\main.o: pc$(CB) $(HACK_H)
  847. X    $(CC) $(CFLAGS) /Fo$@ pc$(AB)
  848. X
  849. X$(OBJ)\tty.o:  pc$(CB) $(HACK_H) $(INCL)\func_tab.h
  850. X    $(CC) $(CFLAGS) /Fo$@ pc$(AB)
  851. X
  852. X$(OBJ)\unix.o: pc$(CB) $(HACK_H)
  853. X    $(CC) $(CFLAGS) /Fo$@ pc$(AB)
  854. X
  855. X#
  856. X# Secondary targets
  857. X#
  858. X
  859. Xauxil:    spec_lev data rumors
  860. X    xcopy $(AUX)\cmdhelp $(GAMEDIR)
  861. X    xcopy $(AUX)\help    $(GAMEDIR)
  862. X    xcopy $(AUX)\hh      $(GAMEDIR)
  863. X    xcopy $(AUX)\history $(GAMEDIR)
  864. X    xcopy $(AUX)\license $(GAMEDIR)
  865. X    xcopy $(AUX)\opthelp $(GAMEDIR)
  866. X    xcopy $(AUX)\oracles $(GAMEDIR)
  867. X    xcopy $(AUX)\data    $(GAMEDIR)
  868. X    xcopy $(AUX)\rumors  $(GAMEDIR)
  869. X
  870. Xspec_lev: $(AUX)\castle.des $(AUX)\endgame.des $(AUX)\tower.des
  871. X    lev_comp $(AUX)\castle.des
  872. X    lev_comp $(AUX)\endgame.des
  873. X    lev_comp $(AUX)\tower.des
  874. X    xcopy castle  $(GAMEDIR)
  875. X    xcopy endgame $(GAMEDIR)
  876. X    xcopy tower?  $(GAMEDIR)
  877. X    del castle
  878. X    del endgame
  879. X    del tower?
  880. X
  881. X$(OS2DEFS):
  882. X    @echo NAME $(GAME) WINDOWCOMPAT> $(OS2DEFS)
  883. X    @echo DESCRIPTION '$(GAMEDES)'>> $(OS2DEFS)
  884. X    @echo PROTMODE>> $(OS2DEFS)
  885. X    @echo EXETYPE OS2>> $(OS2DEFS)
  886. X
  887. Xclean:
  888. X    -del $(OBJ)\*.o
  889. X    -rmdir $(OBJ)
  890. X
  891. Xspotless: clean
  892. X    -del $(INCL)\date.h
  893. X    -del $(INCL)\onames.h
  894. X    -del $(INCL)\pm.h
  895. X    -del makedefs.exe
  896. X    -del lev_comp.exe
  897. X    -del *.res
  898. X    -del *.def
  899. X    -del *.map
  900. X    -del $(AUX)\data
  901. X    -del $(AUX)\rumors
  902. X    -del castle
  903. X    -del endgame
  904. X    -del tower?
  905. X
  906. X#
  907. X# Other dependencies.
  908. X#
  909. X# MS-NMAKE doesn't give a damn about default rules here, so until
  910. X# that is fixed, we do this the hard way.
  911. X#
  912. X
  913. X$(OBJ)\allmain.o  : $(CB) $(HACK_H)
  914. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  915. X$(OBJ)\alloc.o    : $(CB) $(CONFIG_H)
  916. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  917. X$(OBJ)\apply.o    : $(CB) $(HACK_H) $(INCL)\edog.h
  918. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  919. X$(OBJ)\artifact.o : $(CB) $(HACK_H) $(INCL)\artifact.h
  920. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  921. X$(OBJ)\attrib.o   : $(CB) $(HACK_H)
  922. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  923. X$(OBJ)\bones.o    : $(CB) $(HACK_H)
  924. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  925. X$(OBJ)\cmd.o      : $(CB) $(HACK_H) $(INCL)\func_tab.h
  926. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  927. X$(OBJ)\dbridge.o  : $(CB) $(HACK_H)
  928. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  929. X$(OBJ)\decl.o     : $(CB) $(HACK_H)
  930. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  931. X$(OBJ)\demon.o    : $(CB) $(HACK_H)
  932. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  933. X$(OBJ)\do.o       : $(CB) $(HACK_H)
  934. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  935. X$(OBJ)\do_name.o  : $(CB) $(HACK_H)
  936. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  937. X$(OBJ)\do_wear.o  : $(CB) $(HACK_H)
  938. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  939. X$(OBJ)\dog.o      : $(CB) $(HACK_H) $(INCL)\edog.h
  940. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  941. X$(OBJ)\dogmove.o  : $(CB) $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
  942. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  943. X$(OBJ)\dokick.o   : $(CB) $(HACK_H) $(INCL)\eshk.h
  944. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  945. X$(OBJ)\dothrow.o  : $(CB) $(HACK_H)
  946. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  947. X$(OBJ)\eat.o      : $(CB) $(HACK_H)
  948. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  949. X$(OBJ)\end.o      : $(CB) $(HACK_H) $(INCL)\eshk.h
  950. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  951. X$(OBJ)\engrave.o  : $(CB) $(HACK_H)
  952. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  953. X$(OBJ)\exper.o    : $(CB) $(HACK_H)
  954. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  955. X$(OBJ)\extralev.o : $(CB) $(HACK_H)
  956. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  957. X$(OBJ)\fountain.o : $(CB) $(HACK_H)
  958. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  959. X$(OBJ)\getline.o  : $(CB) $(HACK_H) $(INCL)\func_tab.h
  960. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  961. X$(OBJ)\hack.o     : $(CB) $(HACK_H)
  962. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  963. X$(OBJ)\invent.o   : $(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  964. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  965. X$(OBJ)\ioctl.o    : $(CB) $(HACK_H)
  966. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  967. X$(OBJ)\lock.o     : $(CB) $(HACK_H)
  968. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  969. X$(OBJ)\makemon.o  : $(CB) $(HACK_H)
  970. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  971. X$(OBJ)\mail.o     : $(CB) $(HACK_H)
  972. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  973. X$(OBJ)\mcastu.o   : $(CB) $(HACK_H)
  974. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  975. X$(OBJ)\mhitm.o    : $(CB) $(HACK_H) $(INCL)\artifact.h
  976. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  977. X$(OBJ)\mhitu.o    : $(CB) $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
  978. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  979. X$(OBJ)\mklev.o    : $(CB) $(HACK_H)
  980. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  981. X$(OBJ)\mkmaze.o   : $(CB) $(HACK_H)
  982. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  983. X$(OBJ)\mkobj.o    : $(CB) $(HACK_H)
  984. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  985. X$(OBJ)\mkroom.o   : $(CB) $(HACK_H)
  986. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  987. X$(OBJ)\mon.o      : $(CB) $(HACK_H) $(INCL)\mfndpos.h $(INCL)\wseg.h
  988. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  989. X$(OBJ)\mondata.o  : $(CB) $(HACK_H) $(INCL)\eshk.h $(INCL)\epri.h
  990. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  991. X$(OBJ)\monmove.o  : $(CB) $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
  992. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  993. X$(OBJ)\monst.o    : $(CB) $(CONFIG_H) $(PERMONST_H) $(INCL)\monsym.h $(INCL)\eshk.h \
  994. X            $(INCL)\vault.h $(INCL)\epri.h $(INCL)\color.h
  995. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  996. X$(OBJ)\msdos.o    : $(CB) $(HACK_H)
  997. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  998. X$(OBJ)\mthrowu.o  : $(CB) $(HACK_H)
  999. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1000. X$(OBJ)\music.o    : $(CB) $(HACK_H)
  1001. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1002. X$(OBJ)\o_init.o   : $(CB) $(HACK_H)
  1003. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1004. X$(OBJ)\objects.o  : $(CB) $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h $(INCL)\prop.h \
  1005. X            $(INCL)\color.h
  1006. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1007. X$(OBJ)\objnam.o   : $(CB) $(HACK_H)
  1008. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1009. X$(OBJ)\options.o  : $(CB) $(HACK_H)
  1010. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1011. X$(OBJ)\pager.o    : $(CB) $(HACK_H)
  1012. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1013. X$(OBJ)\panic.o    : $(CB) $(CONFIG_H)
  1014. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1015. X$(OBJ)\pickup.o   : $(CB) $(HACK_H)
  1016. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1017. X$(OBJ)\polyself.o : $(CB) $(HACK_H)
  1018. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1019. X$(OBJ)\potion.o   : $(CB) $(HACK_H)
  1020. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1021. X$(OBJ)\pray.o     : $(CB) $(HACK_H)
  1022. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1023. X$(OBJ)\pri.o      : $(CB) $(HACK_H) $(INCL)\epri.h $(INCL)\termcap.h
  1024. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1025. X$(OBJ)\priest.o   : $(CB) $(HACK_H) $(INCL)\mfndpos.h $(INCL)\eshk.h $(INCL)\epri.h
  1026. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1027. X$(OBJ)\prisym.o   : $(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  1028. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1029. X$(OBJ)\random.o   : $(CB)
  1030. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1031. X$(OBJ)\read.o     : $(CB) $(HACK_H)
  1032. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1033. X$(OBJ)\restore.o  : $(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  1034. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1035. X$(OBJ)\rip.o      : $(CB) $(HACK_H)
  1036. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1037. X$(OBJ)\rnd.o      : $(CB) $(HACK_H)
  1038. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1039. X$(OBJ)\rumors.o   : $(CB) $(HACK_H)
  1040. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1041. X$(OBJ)\save.o     : $(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  1042. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1043. X$(OBJ)\search.o   : $(CB) $(HACK_H) $(INCL)\artifact.h
  1044. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1045. X$(OBJ)\shk.o      : $(CB) $(HACK_H) $(INCL)\eshk.h
  1046. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1047. X$(OBJ)\shknam.o   : $(CB) $(HACK_H) $(INCL)\eshk.h
  1048. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1049. X$(OBJ)\sit.o      : $(CB) $(HACK_H)
  1050. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1051. X$(OBJ)\sounds.o   : $(CB) $(HACK_H) $(INCL)\edog.h $(INCL)\eshk.h
  1052. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1053. X$(OBJ)\sp_lev.o   : $(CB) $(HACK_H) $(INCL)\sp_lev.h
  1054. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1055. X$(OBJ)\spell.o    : $(CB) $(HACK_H)
  1056. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1057. X$(OBJ)\steal.o    : $(CB) $(HACK_H)
  1058. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1059. X$(OBJ)\termcap.o  : $(CB) $(HACK_H) $(INCL)\termcap.h
  1060. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1061. X$(OBJ)\timeout.o  : $(CB) $(HACK_H)
  1062. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1063. X$(OBJ)\topl.o     : $(CB) $(HACK_H)
  1064. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1065. X$(OBJ)\topten.o   : $(CB) $(HACK_H)
  1066. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1067. X$(OBJ)\track.o    : $(CB) $(HACK_H)
  1068. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1069. X$(OBJ)\trap.o     : $(CB) $(HACK_H) $(INCL)\edog.h
  1070. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1071. X$(OBJ)\u_init.o   : $(CB) $(HACK_H)
  1072. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1073. X$(OBJ)\uhitm.o    : $(CB) $(HACK_H) $(INCL)\artifact.h
  1074. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1075. X$(OBJ)\vault.o    : $(CB) $(HACK_H) $(INCL)\vault.h
  1076. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1077. X$(OBJ)\version.o  : $(CB) $(HACK_H) $(INCL)\date.h $(INCL)\patchlev.h
  1078. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1079. X$(OBJ)\weapon.o   : $(CB) $(HACK_H)
  1080. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1081. X$(OBJ)\were.o     : $(CB) $(HACK_H)
  1082. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1083. X$(OBJ)\wield.o    : $(CB) $(HACK_H)
  1084. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1085. X$(OBJ)\wizard.o   : $(CB) $(HACK_H)
  1086. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1087. X$(OBJ)\worm.o     : $(CB) $(HACK_H) $(INCL)\wseg.h
  1088. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1089. X$(OBJ)\worn.o     : $(CB) $(HACK_H)
  1090. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1091. X$(OBJ)\write.o    : $(CB) $(HACK_H)
  1092. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1093. X$(OBJ)\zap.o      : $(CB) $(HACK_H)
  1094. X    $(CC) $(CFLAGS) /Fo$@ $(AB)
  1095. END_OF_FILE
  1096. if test 17844 -ne `wc -c <'others/Makefile.os2'`; then
  1097.     echo shar: \"'others/Makefile.os2'\" unpacked with wrong size!
  1098. fi
  1099. # end of 'others/Makefile.os2'
  1100. echo shar: Extracting \"'others/ovlmgr.doc'\" \(13383 characters\)
  1101. sed "s/^X//" >'others/ovlmgr.doc' <<'END_OF_FILE'
  1102. X             Brief notes about ovlmgr.asm
  1103. X             ----------------------------
  1104. X             (revised 1990may27)
  1105. X
  1106. XOVLMGR.ASM is a preliminary version of a multiple-residency overlay
  1107. Xmanager for use with the Microsoft Overlay Linker.  It is functionally
  1108. Xcompatible with the one in the MSC library _except_:
  1109. X
  1110. X- it usually accesses the disk less often and is a lot faster in some
  1111. X  applications.
  1112. X- it has different tuning characteristics.
  1113. X- you must (of course) link OVLMGR.OBJ into the root overlay (that is,
  1114. X  outside any parentheses in the link command).
  1115. X
  1116. X  See also the notes below.
  1117. X
  1118. X    As with other Microsoft-compatible overlay handlers you must be
  1119. X*very* careful never to call a function in an overlay through a pointer,
  1120. Xunless the initiator of the call resides in the *same* physical overlay
  1121. Xas the target (1).  Furthermore, setjmp() and longjmp() are not
  1122. Xsupported.
  1123. X
  1124. X    Unlike the Microsoft system, most of the available memory is
  1125. Xused to hold overlays.    Care must be taken to ensure that enough space
  1126. Xis reserved for the C heap.  This can be accomplished through
  1127. Xinformation stored in the .EXE file (currently the minalloc parameter,
  1128. Xas described below).
  1129. X
  1130. X       Furthermore, expanded memory support (EMS) is now an integral
  1131. Xpart of the overlay manager.  LIM EMS versions 3.2 and 4.0 are
  1132. Xsupported.  Note that the page frame must be 4 pages long (64K bytes) to
  1133. Xbe able to operate correctly (most drivers allocate a 64K frame by
  1134. Xdefault).  The overlay manager will use as much EMS as is necessary in
  1135. X64K chunks, up to a limit of 16 chunks (1 Meg).  Both hardware and
  1136. Xsoftware EMS drivers have been tested and found to be completely
  1137. Xcompatible.
  1138. X
  1139. X                ~ * ~
  1140. X
  1141. X    OVLMGR.ASM currently has two assembly-time options, which are
  1142. Xspecified with the assembler's /D<symbol> option (or compatible).  They
  1143. Xare:
  1144. X
  1145. X    /DNOEMS Disable EMS support.
  1146. X        OVLMGR normally detects the presence of EMS memory and
  1147. X        makes use of it whenever it is present.  This flag
  1148. X        instructs ovlmgr to ignore EMS and operate only out of
  1149. X        conventional memory.  It should be used when overlaying
  1150. X        programmes which expect to use EMS themselves.
  1151. X
  1152. X    /Di386    Use 80386-specific instruction sequences.
  1153. X        Use of this flag will make ovlmgr perform better on
  1154. X        machines with 80386 processors.  However, the resulting
  1155. X        programme will not run at all on machines with less
  1156. X        capable CPUs.  Use this option with caution, especially
  1157. X        in the case of distribution code.
  1158. X
  1159. X                ~ * ~
  1160. X
  1161. X    Although using the overlay manager is in essence much like using
  1162. XMicrosoft's, they operate on a slightly different principle, and tuning
  1163. Xfor them is rather different.  Technical part begins.
  1164. X
  1165. X    When overlay linking is requested (see your linker manual), the
  1166. XMS overlay linker changes all far calls into overlays from the (normal,
  1167. X8086) format:
  1168. X
  1169. X    offset    contents
  1170. X    ------    --------
  1171. X    :0000    CALL
  1172. X    :0001    target-offset
  1173. X    :0003    target-segment
  1174. X
  1175. Xto this:
  1176. X    :0000    INT
  1177. X    :0001    int#    target-mod#
  1178. X    :0003    target-offset
  1179. X
  1180. X(note that here we are looking at the actual layout of the machine
  1181. Xcode, not at the assembly code as such) and relocates the code parts
  1182. Xof all the different overlays into the *same* physical area.  The
  1183. Xoverlaid code is all actually placed at the end of the .EXE file,
  1184. Xafter the 'normal' executable image, along with all its administrative
  1185. Xdata (fixups etc.).
  1186. X
  1187. X    When this altered 'call' is executed, of course, the interrupt
  1188. Xhandler int# is invoked.  Its job is to ensure that the target overlay
  1189. Xmodule is in memory (reading it from the tail of the .EXE file if it
  1190. Xisn't already loaded) and then transfer to the given offset within it,
  1191. X'faking up' the effect of the 'real' far call that would normally have
  1192. Xoccurred.  Something similar must be done when the call returns, to
  1193. Xensure that the thing being returned *into* is still (or is once more)
  1194. Xloaded.
  1195. X
  1196. X    The Microsoft linker, as we have said, relocates all the
  1197. Xoverlays to the same load address; and, in fact, it allocates am empty
  1198. Xblock of memory there that is at least as large as the largest
  1199. Xoverlay.  Into this area all the overlays are loaded without further
  1200. Xchange; thus, there can only ever be one overlay in memory at one
  1201. Xtime.  Transferring from one overlay to another causes one overlay to
  1202. Xreplace the other in the allocated overlay swap area.
  1203. X
  1204. X       Our overlay manager does not use the space allocated by the
  1205. Xlinker in the same way.  Rather, it allocates almost all of the memory
  1206. Xavailable from MS-DOS (including the original overlay area and any high
  1207. XDOS memory) as well as EMS memory if some is available and that option
  1208. Xis being used.    As overlays are needed, they are loaded wherever they
  1209. Xwill fit, and dynamically relocated to that address.  Thus, many more
  1210. Xthan one overlay may be loaded at any given time, greatly increasing
  1211. Xpotential performance.    Management of space is more or less according to
  1212. Xan LRU policy - once all of memory is full, the least recently used
  1213. Xoverlay is selected as the most likely candidate for replacement.
  1214. X
  1215. X    The implications of this difference are as follows:  while with
  1216. Xthe conventional (default) overlay manager, the best strategy is to
  1217. Xgroup object modules together in an overlay whenever they are known to
  1218. Xbe used in rapid succession, to make each overlay as big as possible
  1219. X(all things being equal) in order to take advantage of all available
  1220. Xmemory, and to make as few overlays as possible (to reduce the amount of
  1221. Xdisk access), the best strategy with our overlay manager is almost the
  1222. Xreverse.  Having a lot of small overlays will increase the amount of
  1223. Xuseful stuff that can be resident in memory at the same time; all of
  1224. Xmemory will automatically be employed; and there is no advantage at all
  1225. Xto uniformity of size (except perhaps in the unlikely case of *exact*
  1226. Xuniformity!).
  1227. X
  1228. X    Although ovlmgr allocates all available memory while it is
  1229. Xactive, you will find that the DOS exec() call works normally.    The
  1230. Xmemory that is allocated for administering the overlay system is freed
  1231. Xbefore the exec call is made and reallocated afterwards (we trap the DOS
  1232. Xfunction request vector to do this, which isn't very nice as a
  1233. Xprogramming practise but makes the existence of the overlay manager far
  1234. Xmore transparent).  There is, however, one circumstance under which this
  1235. Xcan be problematic:  if you use the exec() call to load a TSR
  1236. Xapplication, thereby causing memory that the overlay manager was using
  1237. Xto become unavailable, you may make it impossible for the overlaid
  1238. Xapplication to proceed.  This is because code that is nominally
  1239. X'running' (i.e. is currently on the stack) cannot be relocated and must
  1240. Xbe reloaded at the *same address* that previously held it.  If another
  1241. Xprocess now owns that area of memory, there is nothing we can do.  We
  1242. Xbelieve that this should not be a serious concern in normal use.
  1243. X
  1244. X                ~ * ~
  1245. X
  1246. X    Since all available memory is potentially used by ovlmgr, there
  1247. Xis one additional concern in using it with C programmes:  the allocation
  1248. Xof sufficient space for the C heap (2).  While previous versions of
  1249. Xovlmgr.asm required the change of an internal constant and re-assembly
  1250. Xof ovlmgr to change the amount of space pre-allocated for this purpose,
  1251. Xthe current version uses the DOS minalloc parameter in the executable
  1252. Xfile to hold the size of the desired heap area.  This parameter can be
  1253. Xset at any time after the link process with either Microsoft's exemod
  1254. Xutility or with the supplied utility, exesmurf.
  1255. X
  1256. X                ~ * ~
  1257. X
  1258. XNOTA BENE: This is a preliminary version of the overlay manager, but
  1259. Xby now it should be fairly well debugged. If you are considering
  1260. Xupgrading it please be aware that the following improvements are
  1261. Xplanned for the next version (though who knows when delivery will
  1262. Xoccur):
  1263. X
  1264. X      - compatible versions of setjmp() and longjmp()
  1265. X      - integral malloc() to eliminate the heap size guesswork
  1266. X      - support for swapped data areas (read-only and read/write)
  1267. X      - improved performance through dynamic link-loading (maybe)
  1268. X      - XMS support and improved EMS support
  1269. X      - support for divergent-functionality overlays (such as
  1270. X      hardware-specific modules)
  1271. X      - enabling the overlay locking code
  1272. X      - Major code revamping
  1273. X
  1274. XSwap On!
  1275. X
  1276. X------------------------------------------------------------------------
  1277. XMESSAGES
  1278. X
  1279. XOVLMGR: Not enough free memory left to run this program.
  1280. X
  1281. X    Although DOS successfully loaded the programme, it proved
  1282. X    impossible to allocate enough additional contiguous memory to
  1283. X    load one or more of the overlays.  Either reduce the
  1284. X    RAM-loading of the application by reducing the size of either
  1285. X    the root or the largest overlays, or increase the amount of
  1286. X    memory available by unloading TSRs and/or simplifying your
  1287. X    CONFIG.SYS.
  1288. X
  1289. XOVLMGR: Internal memory allocation failure.
  1290. X
  1291. X    Either an internal error has occurred in ovlmgr or the
  1292. X    application programme, or some event has caused memory that
  1293. X    ovlmgr believed it could count on becoming unavailable.  A
  1294. X    typical example of the latter would be the result of
  1295. X    attempting to load a TSR while an overlaid application is
  1296. X    running.
  1297. X
  1298. XOVLMGR: Inaccessible EXE file. Can't load overlays.
  1299. X
  1300. X    For some reason ovlmgr could not locate or read the original
  1301. X    .EXE file in which the overlays reside.  This could be due to
  1302. X    your attempting to use a very old version of DOS,
  1303. X    an abject shortage of file handles, some strange event causing
  1304. X    the file to be deleted, a disk error, or the diskette that
  1305. X    contained the executable being removed.
  1306. X
  1307. XOVLMGR: Incorrect DOS version. Must be 3.00 or later.
  1308. X
  1309. X    The current version of ovlmgr does not support versions of DOS
  1310. X    prior to 3.0 because of the difficulty of locating the
  1311. X    executable file (and hence the overlays) at runtime.
  1312. X
  1313. XOVLMGR: EMS memory manager error.
  1314. X
  1315. X    An error occurred during an EMS access.  Either the hardware has
  1316. X    reported a bug, the software driver has detected an anomaly or
  1317. X    the page frame is not 64K bytes in length.
  1318. X
  1319. X(xxxx:xxxx:xxxx:xxxx)
  1320. X
  1321. X    This is a diagnostic code composed of the following fields:
  1322. X        - error code
  1323. X        - version number
  1324. X        - available conventional memory
  1325. X        - EMS memory usage
  1326. X    Please note it in any bug reports or correspondence with the
  1327. X    development team.
  1328. X
  1329. X------------------------------------------------------------------------
  1330. XKNOWN BUGS
  1331. X
  1332. XThe present version cannot always be used as a direct replacement for
  1333. XMicrosoft's overlay manager (even granted the documented differences)
  1334. Xbecause the minimum size required for an overlaid programme to run is at
  1335. Xleast the size of the root plus TWICE the size of the largest overlay.
  1336. XIf a programme has previously had its overlay structure tuned to take
  1337. Xbest advantage of Microsoft overlays, this may well cause a problem.
  1338. XThe overlays themselves will need to be split up.
  1339. X
  1340. XTransfers between overlays are very slow in machine terms, even if both
  1341. Xoverlays happen to reside in memory at the time (still significantly
  1342. Xfaster than Microsoft's, though).
  1343. X
  1344. XLocking overlays into memory is not really implemented even though
  1345. Xreading the source code might make you think it was.  Actually, reading
  1346. Xthe source code itself isn't very well implemented right now.  Comments
  1347. Xand stuff would help.  Yup, yup.
  1348. X
  1349. XDue to limitations in the LIM EMS standard (to 4.0), programmes that
  1350. Xthemselves use EMS memory cannot be overlaid with ovlmgr unless ovlmgr's
  1351. Xown EMS support is disabled.  This is accomplished by assembling with
  1352. Xthe /DNOEMS flag.
  1353. X
  1354. X------------------------------------------------------------------------
  1355. XBUG ALERT
  1356. X
  1357. XTo repeat a point made above, if you ever try to call a function in an
  1358. Xoverlay through a pointer, you *may* die with the Microsoft overlay
  1359. Xmanager.  If you ever try to call a function in an overlay through a
  1360. Xpointer, you *will* die with ours.  Nothing in an overlay ever ends up
  1361. Xin the same segment as the linker anticipated.    You have been warned!
  1362. X
  1363. X------------------------------------------------------------------------
  1364. XFOOTNOTES
  1365. X
  1366. X(1) This problem can be circumvented through the use of surrogate
  1367. X'trampoline' functions:  functions that reside in the root overlay and
  1368. Xsimply pass right through to the 'real', overlaid, implementations.
  1369. XThis can even be made transparent to the source code through the use
  1370. Xof the C macro preprocessor, with a locution of the form
  1371. X    #define foo(x) foo_(x)
  1372. Xvisible everywhere except at the actual definition point of the
  1373. Xtrampoline.  This has been implemented in NetHack 3.0.
  1374. X
  1375. X(2) If you should get a message to the effect that NetHack can't
  1376. Xallocate 28000 and some bytes when entering a maze level, that
  1377. Xisn't our problem!  In all probability you forgot to rebuild your
  1378. Xspecial level files when you changed the compiler flags.  We got
  1379. Xthat one, too, at one point.  The same applies to similar messages when
  1380. Xreading bones files or saved games:  it is more likely that you forgot
  1381. Xto discard them after recompiling your game than that the memory
  1382. Xallowance is so greatly incorrect.
  1383. X
  1384. X----------------------------------------------------------------------
  1385. XNOTICE
  1386. X
  1387. XOVLMGR.ASM is brought to you by Pierre Martineau and Stephen Spackman.
  1388. XIt, and this document, are copyright.  They are, however, provided as
  1389. Xpart of NetHack and may be freely distributed as described in the
  1390. XNetHack license.
  1391. X
  1392. X----------------------------------------------------------------------
  1393. XStephen P Spackman                 stephen@tira.uchicago.edu
  1394. XPierre G Martineau                  pierre@ozrout.uu.net
  1395. X----------------------------------------------------------------------
  1396. X    Copyright (c) 1989, 1990 Pierre G Martineau and Stephen P Spackman
  1397. X    All Rights Reserved.
  1398. END_OF_FILE
  1399. if test 13383 -ne `wc -c <'others/ovlmgr.doc'`; then
  1400.     echo shar: \"'others/ovlmgr.doc'\" unpacked with wrong size!
  1401. fi
  1402. # end of 'others/ovlmgr.doc'
  1403. echo shar: Extracting \"'vms/spec_lev.com'\" \(1123 characters\)
  1404. sed "s/^X//" >'vms/spec_lev.com' <<'END_OF_FILE'
  1405. X$ ! vms/spec_lev.com -- preprocess nethack's special level compiler code
  1406. X$ !
  1407. X$ ! This operation is optional.  If you are able to perform it and choose
  1408. X$ ! to do so, you should do it prior to executing vmsbuild.com.
  1409. X$ !
  1410. X$
  1411. X$ ! setup yacc/bison and lex/flex;
  1412. X$ !      (uncomment the alternatives appropriate for your site)
  1413. X$     ! yacc := bison/def            !native bison (w/ DCL CLD)
  1414. X$     ! yacc := $bison$dir:bison -y -d        !'foreign' bison (w/o CLD)
  1415. X$    yacc := $shell$exe:yacc -d        !yacc from DECshell
  1416. X$     ! lex  := $flex$dir:flex            !flex
  1417. X$    lex  := $shell$exe:lex            !lex from DECshell
  1418. X$ ! additional setup
  1419. X$    rename := rename/new_vers
  1420. X$    ! start from a known location -- [.vms], then move to [-.src]
  1421. X$    cur_dir = f$environment("DEFAULT")
  1422. X$    set default 'f$parse(f$environment("PROCEDURE"),,,"DIRECTORY")'
  1423. X$    set default [-.src]    !move to source directory
  1424. X$
  1425. X$ ! process lev_comp.y into lev_comp.c and ../include/lev_comp.h
  1426. X$  yacc lev_comp.y
  1427. X$  rename y_tab.c lev_comp.c
  1428. X$  rename y_tab.h [-.include]lev_comp.h
  1429. X$
  1430. X$ ! process lev_comp.l into lev_lex.c
  1431. X$  lex lev_comp.l
  1432. X$  rename lex_yy.c lev_lex.c
  1433. X$
  1434. X$ ! done
  1435. X$  set default 'cur_dir'
  1436. X$ exit
  1437. END_OF_FILE
  1438. if test 1123 -ne `wc -c <'vms/spec_lev.com'`; then
  1439.     echo shar: \"'vms/spec_lev.com'\" unpacked with wrong size!
  1440. fi
  1441. # end of 'vms/spec_lev.com'
  1442. echo shar: End of archive 23 \(of 24\).
  1443. cp /dev/null ark23isdone
  1444. MISSING=""
  1445. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  1446.     if test ! -f ark${I}isdone ; then
  1447.     MISSING="${MISSING} ${I}"
  1448.     fi
  1449. done
  1450. if test "${MISSING}" = "" ; then
  1451.     echo You have unpacked all 24 archives.
  1452.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1453. else
  1454.     echo You still need to unpack the following archives:
  1455.     echo "        " ${MISSING}
  1456. fi
  1457. ##  End of shell archive.
  1458. exit 0
  1459.